package com.woniuxy.stall.feign;

import com.woniuxy.core.model.Result;
import com.woniuxy.renters.dao.RentersInfo;
import com.woniuxy.renters.model.form.AddCarportForm;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "renters-server")
@ComponentScan
public interface RentersClient {
    @GetMapping("/renters/rentersInfo/loadAllRentersinfobyId")
    Result<RentersInfo> getRentersInfoById(@RequestParam("rentersInfoId") Integer rentersInfoId);

    @PostMapping("/renters/rentersInfo/addCarport")
    Result<RentersInfo> addCarport(@RequestBody AddCarportForm acf);

    @GetMapping("/renters/rentersInfo/haveidcard")
    Result<Boolean>  loadAllRentersInfoss(@RequestParam("id") String id);
}
